/** @file hmm_arguments.h
 *
 *  @author Dongryeol Lee (drselee@gmail.com)
 */

#ifndef MLPACK_HMM_HMM_ARGUMENTS_H
#define MLPACK_HMM_HMM_ARGUMENTS_H

#include "core/abstract/abstract_arguments.h"

namespace mlpack {
namespace hmm {

class HMMArguments : public core::abstract::AbstractArguments {
  public:
    int num_states_;

  public:

    HMMArguments() {

      // Default values.
      num_states_ = 0;

      // Add more descriptions.
      desc_->add_options()(
        "num_states_in",
        boost::program_options::value<int>(),
        "REQUIRED The number of discrete states for HMM."
      );
    }

  private:

    bool Validate_() const {

      if(vm.count("num_states_in") == 0 ||
          vm_["num_states_in"].as<int>() <= 0) {
        std::cerr << "The --num_states_in requires a positive integer.\n";
        return false;
      }
      return true;
    }

    bool Parse_(
      boost::mpi::communicator &world,
      const std::vector< std::string > & args) {

      // Validate the arguments.
      if(! this->Validate_()) {
        return false;
      }

      num_states_ = vm_["num_states_in"].as<int>();
      return false;
    }
};
}
}

#endif
